package com.baselibrary.adapter

import androidx.core.content.ContextCompat
import com.baselibrary.R
import com.baselibrary.bean.BottomDialogBean
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

/*item*/
class ItemListAdapter : BaseQuickAdapter<BottomDialogBean, BaseViewHolder>(R.layout.item_text) {

    override fun convert(helper: BaseViewHolder, item: BottomDialogBean) {
        helper.setText(R.id.tv_item, item.title)
        helper.setTextColor(R.id.tv_item, if (item.isHighLight) ContextCompat.getColor(mContext, R.color.color_D53) else ContextCompat.getColor(mContext, R.color.color_333333))
        helper.setGone(R.id.v_line, helper.adapterPosition != data.size - 1)
    }
}